package com.ruoyi.production.service.impl.graftingclip;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.production.domain.graftingclip.GraftingclipApplyTemporary;
import com.ruoyi.production.mapper.graftingclip.GraftingclipApplyTemporaryMapper;
import com.ruoyi.production.service.graftingclip.IGraftingclipApplyTemporaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 嫁接夹临时申请Service业务层处理
 *
 * @author ruoyi
 * @date 2021-07-11
 */
@Service
public class GraftingclipApplyTemporaryServiceImpl implements IGraftingclipApplyTemporaryService
{
    @Autowired
    private GraftingclipApplyTemporaryMapper graftingclipApplyTemporaryMapper;

    /**
     * 查询嫁接夹临时申请
     *
     * @param graftingclipApplyTemporaryId 嫁接夹临时申请ID
     * @return 嫁接夹临时申请
     */
    @Override
    public GraftingclipApplyTemporary selectGraftingclipApplyTemporaryById(Long graftingclipApplyTemporaryId)
    {
        return graftingclipApplyTemporaryMapper.selectGraftingclipApplyTemporaryById(graftingclipApplyTemporaryId);
    }

    /**
     * 查询嫁接夹临时申请列表
     *
     * @param graftingclipApplyTemporary 嫁接夹临时申请
     * @return 嫁接夹临时申请
     */
    @Override
    public List<GraftingclipApplyTemporary> selectGraftingclipApplyTemporaryList(GraftingclipApplyTemporary graftingclipApplyTemporary)
    {
        return graftingclipApplyTemporaryMapper.selectGraftingclipApplyTemporaryList(graftingclipApplyTemporary);
    }

    /**
     * 新增嫁接夹临时申请
     *
     * @param graftingclipApplyTemporary 嫁接夹临时申请
     * @return 结果
     */
    @Override
    public int insertGraftingclipApplyTemporary(GraftingclipApplyTemporary graftingclipApplyTemporary)
    {













        graftingclipApplyTemporary.setCreateTime(DateUtils.getNowDate());



        return graftingclipApplyTemporaryMapper.insertGraftingclipApplyTemporary(graftingclipApplyTemporary);
    }

    /**
     * 修改嫁接夹临时申请
     *
     * @param graftingclipApplyTemporary 嫁接夹临时申请
     * @return 结果
     */
    @Override
    public int updateGraftingclipApplyTemporary(GraftingclipApplyTemporary graftingclipApplyTemporary)
    {
        graftingclipApplyTemporary.setUpdateTime(DateUtils.getNowDate());
        return graftingclipApplyTemporaryMapper.updateGraftingclipApplyTemporary(graftingclipApplyTemporary);
    }

    /**
     * 批量删除嫁接夹临时申请
     *
     * @param graftingclipApplyTemporaryIds 需要删除的嫁接夹临时申请ID
     * @return 结果
     */
    @Override
    public int deleteGraftingclipApplyTemporaryByIds(Long[] graftingclipApplyTemporaryIds)
    {
        return graftingclipApplyTemporaryMapper.deleteGraftingclipApplyTemporaryByIds(graftingclipApplyTemporaryIds);
    }

    /**
     * 删除嫁接夹临时申请信息
     *
     * @param graftingclipApplyTemporaryId 嫁接夹临时申请ID
     * @return 结果
     */
    @Override
    public int deleteGraftingclipApplyTemporaryById(Long graftingclipApplyTemporaryId)
    {
        return graftingclipApplyTemporaryMapper.deleteGraftingclipApplyTemporaryById(graftingclipApplyTemporaryId);
    }
}
